package com.example.controller.datastatistics.yaolaofuwuchuangwei;

import com.example.bean.datastatistics.yanglaofuwuchuangwei.YangLaoFuChuangWeiDuoTiaoJian;
import com.example.service.datastatistics.yanglaofuwuchuangwei.YangLaoFuWuChuangWeiService;
import com.example.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/chuangwei")
public class YangLaoFuWuChuangWeiController {
    @Autowired
    YangLaoFuWuChuangWeiService yangLaoFuWuChuangWeiService;
    @PostMapping
    public Result result(@RequestBody YangLaoFuChuangWeiDuoTiaoJian yangLaoFuChuangWeiDuoTiaoJian){
        System.out.println("tostring------------------------"+yangLaoFuChuangWeiDuoTiaoJian.toString());
        Result result = new Result();
        result.ok();
        result.setData(yangLaoFuWuChuangWeiService.yanglaofuwuchuangweiList(yangLaoFuChuangWeiDuoTiaoJian));
        return result;
    }
}
